

#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)strcpy.c	8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: strcpy.c,v 1.3 2011/11/08 16:52:11 joerg Exp $");
#endif
#endif /* LIBC_SCCS and not lint */

#if !defined(_KERNEL) && !defined(_STANDALONE)
#include <assert.h>
#include <string.h>
#else
#include <lib/libkern/libkern.h>
#endif

#undef strcpy

char *
strcpy(char *to, const char *from)
{
	char *save = to;

	_DIAGASSERT(to != NULL);
	_DIAGASSERT(from != NULL);

	for (; (*to = *from) != '\0'; ++from, ++to);
	return(save);
}
